<%-- 
    Document   : NMatrimonio
    Created on : 12-sep-2013, 16:54:10
    Author     : WALDIR
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="com.ptr.ptrsystem.bean.*" %>
<%@page import="com.ptr.ptrsystem.dao.Lista" %>
<%@page import="java.util.LinkedList" %>
<%@page language="java" %>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Registro De Matrimonio</title>
        <link rel='stylesheet' type="text/css" href='/RegCivil/css/estilos.css' >
        <link rel="stylesheet" type="text/css" href="/RegCivil/datepicker/css/cupertino/jquery-ui-1.10.3.custom.min.css"/>
        <script type="text/javascript" src="/RegCivil/datepicker/jquery-1.9.1.js"></script>
        <script type="text/javascript" src="/RegCivil/datepicker/jquery-ui-1.10.3.custom.min.js"></script>
        <script type="text/javascript" src="/RegCivil/calendario/calendario.js"></script>
        <script type="text/javascript">
            if (window.ActiveXObject) {
                var obj = new ActiveXObject("Microsoft.XMLHTTP");
            }
            if (window.XMLHttpRequest) {
                var obj = new XMLHttpRequest();
            }
            ///verificar el n matrimonio 
            function verificarMatrimonio()
            {
                var vcodigo = document.getElementById("codper").value;
                obj.onreadystatechange = function() {
                    if (obj.readyState == 4)
                    {
                        var json = eval("(" + obj.responseText + ")");

                        if (json.mensage == 'SI')
                        {
                            document.getElementById("nroActaMat").value = json.nActa;
                            document.getElementById("fechRegM").value = json.fecha;
                            document.getElementById("nrolibro").value = json.nlibro;
                            document.getElementById("nombreubigeoM").value = json.nubigeo;
                            document.getElementById("dniP1").value = json.dni1;
                            document.getElementById("NombredniP1").value = json.ndni1;
                            document.getElementById("dniP2").value = json.dni2;
                            document.getElementById("NombredniP2").value = json.ndni2;
                            alert('EXISTE UNA ACTA DE MATRIMONIO DE LA PERSONA ');
                        }else{
                              document.getElementById("nroActaMat").value = "";
                            document.getElementById("fechRegM").value = "";
                            document.getElementById("nrolibro").value = "";
                            document.getElementById("nombreubigeoM").value = "";
                            document.getElementById("dniP1").value = "";
                            document.getElementById("NombredniP1").value = "";
                            document.getElementById("dniP2").value = "";
                            document.getElementById("NombredniP2").value = "";
                        }
                    }
                };
                obj.open("post", "${pageContext.request.contextPath}/MatrimonioAjax", true);
                obj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                obj.send("codpersona=" + vcodigo);
            }
            ///
            function mostrar(boton)
            {
                var btn = boton;
                var codpersona = document.getElementById("codper").value;
                var nroActaMatr = document.getElementById("nroActaMat").value;
                var fechRegMat = document.getElementById("fechRegM").value;
                //ubigeo matrimonial
                var depm = document.getElementById("depm");
                var provm = document.getElementById("provm");
                var distm = document.getElementById("distm");
                var otrom = document.getElementById("otrom");
                //
                var dniP1 = document.getElementById("dniP1").value;
                var dniP2 = document.getElementById("dniP2").value;
                var dniT1 = document.getElementById("dniT1").value;
                var dniT2 = document.getElementById("dniT2").value;
                var dniR = document.getElementById("dniR").value;
                var codEst = document.getElementById("codEst").value;
                //ubigeo 
                var dep = document.getElementById("dep");
                var prov = document.getElementById("prov");
                var dist = document.getElementById("dist");
                var otro = document.getElementById("otro");
                //var idUbi = document.getElementById("idUbi").value;
                //
                var codNac = document.getElementById("codNac").value;

                var Nlibro = document.getElementById("NLibro");
                var ruta = document.getElementById("rutActaMat");
                var ruta2 = document.getElementById("rutActaMat2");
                var rutActaMat = Nlibro + "/" + ruta;
                var nroli = document.getElementById("nrolibro").value;
                var txt = "btn1=" + btn + "&codpersona=" + codpersona + "&nroactaMat=" +
                        nroActaMatr + "&NroLibro=" + nroli + "&FRMatr=" + fechRegMat + "&depm=" + depm + "&provm="
                        + provm + "&distm=" + distm + "&otrom=" + otrom + "&DNIP1=" + dniP1 +
                        "&DNIP2=" + dniP2 + "&DNIT1=" + dniT1 + "&DNIT2=" + dniT2 + "&DNIReg=" + dniR +
                        "&CodEsta=" + codEst + "&dep=" + dep + "&prov=" + prov + "&dist=" + dist +
                        "&otro=" + otro + "&CodNac=" + codNac + "&RAMat=" + rutActaMat + "&RAMat2=" + ruta2 + "&NLibro=" + Nlibro;

                if (btn == "mostrarDNIP1")
                {
                    obj.onreadystatechange = function() {
                        document.getElementById("NombredniP1").value= obj.responseText;
                    };
                }
                if (btn == "mostrarDNIP2")
                {
                    obj.onreadystatechange = function() {
                        document.getElementById("NombredniP2").value= obj.responseText;
                    };
                }
                if (btn == "mostrarDNIT1")
                {
                    obj.onreadystatechange = function() {
                        document.getElementById("NombredniT1").value= obj.responseText;
                    };
                }
                if (btn == "mostrarDNIT2")
                {
                    obj.onreadystatechange = function() {
                        document.getElementById("NombredniT2").value= obj.responseText;
                    };
                }
                if (btn == "mostrarREGISTRADOR")
                {
                    obj.onreadystatechange = function() {
                        document.getElementById("nombreRegistrador").value= obj.responseText;
                    };
                }

                obj.open("post", "${pageContext.request.contextPath}/MantenimientoMatrimonio", true);
                obj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                obj.send(txt);
            }

        </script>
        <script type="text/javascript">
            $(document).ready(function() {
                $("#NAVUbigeo").dialog({
                    autoOpen: false,
                    modal: true,
                    height: 300,
                    width: 900,
                    show: "scale",
                    hide: "scale",
                    draggable: false
                });
            });
            $(document).ready(function() {
                $("#NAVUbigeoM").dialog({
                    autoOpen: false,
                    modal: true,
                    height: 300,
                    width: 900,
                    show: "scale",
                    hide: "scale",
                    draggable: false
                });
            });
            $(document).ready(function() {
                $("#shwUbigeo").click(function() {
                    $("#NAVUbigeo").dialog("open");
                });

                $("#shwUbigeoM").click(function() {
                    $("#NAVUbigeoM").dialog("open");
                });
            });
        </script>

        <script type="text/javascript">
            function selectUbigeo(btn)
            {
                var UBI = btn.value;
                var iddep = document.getElementById(UBI).getElementsByTagName('td')[0].innerHTML;
                var idpro = document.getElementById(UBI).getElementsByTagName('td')[1].innerHTML;
                var iddis = document.getElementById(UBI).getElementsByTagName('td')[2].innerHTML;
                var idotr = document.getElementById(UBI).getElementsByTagName('td')[3].innerHTML;
                var dep = document.getElementById(UBI).getElementsByTagName('td')[4].innerHTML;
                var pro = document.getElementById(UBI).getElementsByTagName('td')[5].innerHTML;
                var dis = document.getElementById(UBI).getElementsByTagName('td')[6].innerHTML;
                var otr = document.getElementById(UBI).getElementsByTagName('td')[7].innerHTML;
                var ubi = dep + " - " + pro + " - " + dis + " " + otr;
                document.getElementById("dep").value= iddep;
                document.getElementById("pro").value=idpro;
                document.getElementById("dis").value= iddis;
                document.getElementById("otr").value=idotr;
                document.getElementById("nombreubigeo").value= ubi;
                $("#NAVUbigeo").dialog("close");
            }
            function selectUbigeoM(btn)
            {
                var UBI = btn.value;
                var iddepm = document.getElementById(UBI).getElementsByTagName('td')[0].innerHTML;
                var idprom = document.getElementById(UBI).getElementsByTagName('td')[1].innerHTML;
                var iddism = document.getElementById(UBI).getElementsByTagName('td')[2].innerHTML;
                var idotrm = document.getElementById(UBI).getElementsByTagName('td')[3].innerHTML;
                var depm = document.getElementById(UBI).getElementsByTagName('td')[4].innerHTML;
                var prom = document.getElementById(UBI).getElementsByTagName('td')[5].innerHTML;
                var dism = document.getElementById(UBI).getElementsByTagName('td')[6].innerHTML;
                var otrm = document.getElementById(UBI).getElementsByTagName('td')[7].innerHTML;
                var ubim = depm + " - " + prom + " - " + dism + " " + otrm;
                document.getElementById("depm").value= iddepm;
                document.getElementById("prom").value= idprom;
                document.getElementById("dism").value= iddism;
                document.getElementById("otrm").value= idotrm;
                document.getElementById("nombreubigeoM").value= ubim;
                $("#NAVUbigeoM").dialog("close");
            }
        </script>
        <script type="text/javascript">
            function AUbigeo(btn)
            {
                var dep = document.getElementById("Tdep").value;
                var pro = document.getElementById("Tpro").value;
                var dis = document.getElementById("Tdis").value;
                var otr = document.getElementById("Totr").value;
                var depm = document.getElementById("TdepM").value;
                var prom = document.getElementById("TproM").value;
                var dism = document.getElementById("TdisM").value;
                var otrm = document.getElementById("TotrM").value;

                var txt = "boton=" + btn + "&Tdepartamento=" + dep + "&Tprovincia=" + pro + "&Tdistrito=" + dis +
                        "&Totro=" + otr + "&TdepartamentoM=" + depm + "&TprovinciaM=" + prom + "&TdistritoM=" + dism +
                        "&TotroM=" + otrm;

                if (btn == "Ubigeo")
                {
                    obj.onreadystatechange = function() {
                        document.getElementById("listaU").innerHTML = obj.responseText;
                    };
                }
                if (btn == "UbigeoM")
                {
                    obj.onreadystatechange = function() {
                        document.getElementById("listaUM").innerHTML = obj.responseText;
                    };
                }
                obj.open("post", "${pageContext.request.contextPath}/BusquedaUbigeo", true);
                obj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                obj.send(txt);
            }
        </script>
    </head>
    <body >
        <form enctype="multiform/form-data" action="${pageContext.request.contextPath}/MantenimientoMatrimonio" method="post" class="contacto">
            <table border="0" align="center" style="clear: left;">
                <tr>
                    <td>
                        <fieldset style="alignment-baseline: central" >
                            <legend style="border: 1px solid #dce0e3;background-color: #edf1f5">REGISTRO DE MATRIMONIO</legend>
                            <table border="0">
                                <tr>
                                    <td>
                                        <fieldset >
                                            <legend>DATOS MATRIMONIALES</legend>
                                            <table border="0">
                                                <tr>
                                                    <td><label/>Cod Persona</td>
                                                    <td><input type="text" name="codpersona" id="codper"  required maxlength="8" pattern="^\d{8}" style="width: 170px;">
                                                    </td>
                                                    <td><input type="button" name="busqueda" value="BUSCAR..." onclick="verificarMatrimonio()" style="width: 150px;height: 30px;">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><label/>Nro Acta Mat</td>
                                                    <td><input type="text" name="nroactaMat" id="nroActaMat" required maxlength="8" pattern="^\d{8}" style="width: 170px;">
                                                    </td>
                                                    <td style="text-align: right;"><label/>Nro De Libro</td>
                                                    <td><input type="text" name="NroLibro" id="nrolibro" required style="width: 70px;">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><label/>Fecha Reg Mat</td>
                                                    <td><input type="text" name="FRMatr" id="fechRegM" required maxlength="8" class="tx_fecha" style="width: 170px;">
                                                    </td>
                                                </tr>
                                                <tr>   
                                                    <td colspan="6">
                                                        <fieldset style="padding-left:20px;">
                                                            <legend>Ubigeo Matrimonial</legend>
                                                            <table border="0">
                                                                <tr>
                                                                    <td><input type="text" name="depm" id="depm" size="2"  style="width: 1.0em" maxlength="2"></td>
                                                                    <td><input type="text" name="provm" id="prom" size="2"  style="width: 1.0em" maxlength="2"></td>
                                                                    <td><input type="text" name="distm" id="dism" size="2"  style="width: 1.0em" maxlength="2"></td>
                                                                    <td><input type="text" name="otrom" id="otrm" size="2"  style="width: 1.0em" maxlength="2"></td>
                                                                    <td><input type="text" name="lugar_m" id="nombreubigeoM" style="width: 45.0em"><button type="button" style="width: 3em;margin-left: 5px;" id="shwUbigeoM" >:::</button>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </fieldset>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><label/>DNI Persona 1</td>
                                                    <td><input type="text" name="DNIP1" id="dniP1" maxlength="8" pattern="^\d{8}"  style="width: 150px;">
                                                        <button type="button" style="width: 3em" onclick="mostrar('mostrarDNIP1')">:::</button>
                                                    </td>
                                                    <td colspan="4"><input type="text" name="dnipers1" id="NombredniP1" maxlength="200"  style="width: 450px; font-weight: bold;">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><label/>DNI Persona 2</td>
                                                    <td><input type="text" name="DNIP2" id="dniP2" maxlength="8"  pattern="^\d{8}"  style="width: 150px;">
                                                        <button type="button" style="width: 3em" onclick="mostrar('mostrarDNIP2')">:::</button>
                                                    </td>
                                                    <td colspan="4"><input type="text" name="dnipers2" id="NombredniP2" maxlength="200"  style="width: 450px; font-weight: bold;">
                                                    </td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                        <fieldset>
                                            <legend>TESTIGOS</legend>
                                            <table>
                                                <tr>
                                                    <td><label/>DNI Testigo 1</td>
                                                    <td><input type="text" name="DNIT1" id="dniT1" maxlength="8" pattern="^\d{8}" style="width: 150px;">
                                                        <button type="button" style="width: 3em" onclick="mostrar('mostrarDNIT1')">:::</button>
                                                    </td>
                                                    <td colspan="4"><input type="text" name="dnites1" id="NombredniT1" maxlength="200"   style="width: 450px; font-weight: bold;">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><label/>DNI Testigo 2</td>
                                                    <td><input type="text" name="DNIT2" id="dniT2" maxlength="8"  pattern="^\d{8}" style="width: 150px;">
                                                        <button type="button" style="width: 3em" onclick="mostrar('mostrarDNIT2')">:::</button>
                                                    </td>
                                                    <td colspan="4"><input type="text" name="dnites2" id="NombredniT2"  maxlength="200"  style="width: 450px;font-weight: bold;">
                                                    </td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                        <fieldset>
                                            <legend> DATOS DE REGISTRO</legend>
                                            <table>
                                                <tr>
                                                    <td><label/>DNI Registrador</td>
                                                    <td><input type="text" name="DNIReg" id="dniR" maxlength="8"  pattern="^\d{8}"  style="width: 150px;">
                                                        <button type="button" style="width: 3em" onclick="mostrar('mostrarREGISTRADOR')">:::</button>
                                                    </td>
                                                    <td colspan="4"><input type="text" name="dnireg" id="nombreRegistrador" maxlength="200"   style="width: 450px;font-weight: bold;">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="6">
                                                        <fieldset style="padding-left:20px;">
                                                            <legend>Ubigeo</legend>
                                                            <table border="0">
                                                                <tr>
                                                                    <td><input type="text" name="dep" id="dep" size="2"  style="width: 1.0em" maxlength="2"></td>
                                                                    <td><input type="text" name="prov" id="pro" size="2"  style="width: 1.0em" maxlength="2"></td>
                                                                    <td><input type="text" name="dist" id="dis" size="2"  style="width: 1.0em" maxlength="2"></td>
                                                                    <td><input type="text" name="otro" id="otr" size="2"  style="width: 1.0em" maxlength="2"></td>
                                                                    <td><input type="text" name="lug"  id="nombreubigeo"  style="width: 45.0em" ><button type="button" id="shwUbigeo" style="width: 3em;margin-left: 5px;" onclick="mostrar('mostrarUBIGEO')">:::</button>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </fieldset>
                                                    </td>
                                                </tr>

                                                <tr>
                                                    <td><label/>Cod Estado</td>
                                                    <td><select name="CodEsta" id="codEst" style="padding: 7px 6px;
                                                                width: 110px;
                                                                border: 1px solid #CED5D7;
                                                                resize: none;
                                                                box-shadow:0 0 0 3px #EEF5F7;
                                                                margin: 5px 0;
                                                                text-transform: uppercase;">
                                                            <%LinkedList<Estado> est = Lista.getListaEstado();
                                                                for (int e = 0; e < est.size(); e++) {%>
                                                            <option value="<%=est.get(e).getCOD_ESTADO()%>"><%=est.get(e).getNOM_ESTADO()%></option>                                                                <%}
                                                            %>
                                                        </select>
                                                    </td>
                                                    <td><label/>Cod Nacionalidad</td>
                                                    <td><select name="CodNac" id="codNac" style="padding: 7px 6px;
                                                                width: 110px;
                                                                border: 1px solid #CED5D7;
                                                                resize: none;
                                                                box-shadow:0 0 0 3px #EEF5F7;
                                                                margin: 5px 0;
                                                                text-transform: uppercase;">
                                                            <%LinkedList<Nacionalidad> nac = Lista.getlistaNacionalidad();
                                                                for (int n = 0; n < nac.size(); n++) {%>
                                                            <option value="<%=nac.get(n).getCOD_NACIONALIDAD()%>"><%=nac.get(n).getNOM_NACIONALIDAD()%></option>  
                                                            <%}
                                                            %>
                                                        </select>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><label/>Ruta Acta Matrimonio</td>
                                                    <td colspan="3">
                                                        <input type="file" name="RAMat" id="rutActaMat" style="width: 300px; height: 30px;" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><label/>Ruta Acta Matrimonio 2</td>
                                                    <td colspan="3">
                                                        <input type="file" name="RAMat2" id="rutActaMat2" style="width: 300px; height: 30px;"/>
                                                    </td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4">
                                        <div align="center">                  
                                            <fieldset style="alignment-baseline: central; height: 4em">
                                                <legend style="border: 1px solid #dce0e3;background-color: #edf1f5">BOTONES DE MANTENIMIENTO</legend>
                                                <table align="center" border="0">
                                                    <tr>
                                                        <td><button type="submit" name="btn1" value="guardarMatr" onclick="main()" class="boton" id="BTN1" >Guardar</button></td>
                                                        <td><button type="reset" name="btn1" value="menu">Menu Principal</button></td>
                                                        <td><button type="button" name="btn1" onclick="main()" value="salir" class="">Salir</button></td>
                                                    </tr>
                                                </table>
                                            </fieldset>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <%String msj = (String) request.getAttribute("msj");
                                            if (msj != null) {
                                                if (msj == "1") {%>
                                        <div>
                                            <fieldset style="border-radius: 10px 10px 10px 10px; background-color: #fff5f6;border:1px solid #f57269">
                                                <legend style="border-radius: 10px 10px 10px 10px; background-color: #fff5f6;border:1px solid #f57269"><img src="/RegCivil/imagenes/exclamation.png"> </legend>
                                                <label>Error en almacenar el registro ingresado</label>
                                            </fieldset>
                                        </div>
                                        <%}
                                            if (msj == "2") {%>
                                        <div>
                                            <fieldset style="border-radius: 10px 10px 10px 10px; background-color: #d0e7ff;border:1px solid #61b0ff">
                                                <legend style="border-radius: 10px 10px 10px 10px; background-color: #d0e7ff;border:1px solid #61b0ff"><img src="/RegCivil/imagenes/info.png"> </legend>
                                                <label>El Registro se almaceno Correctamente</label>
                                            </fieldset>
                                        </div>
                                        <%}
                                        %>
                                        <%} else {%>
                                        <div>
                                            <fieldset style="border-radius: 10px 10px 10px 10px; background-color: #fffbe7;border:1px solid #ffe954">
                                                <label style="color:#edd00c; font-size: 1.0em ">Informacion de Almacenamiento</label>
                                            </fieldset>
                                        </div>
                                        <%}%>
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                    </td>
                </tr>
            </table>

        </form>

        <div id="NAVUbigeo" title="Lista De Ubigeos">
            <table>
                <tr>
                    <td><label/>Departamento</td>
                    <td><input type="text" name="Tdepartamento" id="Tdep" onkeyup="AUbigeo('Ubigeo')"/></td>
                    <td><label/>Provincia</td>
                    <td><input type="text" name="Tprovincia" id="Tpro" onkeyup="AUbigeo('Ubigeo')"/></td>
                    <td><label/>Distrito</td>
                    <td><input type="text" name="Tdistrito" id="Tdis" onkeyup="AUbigeo('Ubigeo')"/></td>
                    <td><label/>Otro</td>
                    <td><input type="text" name="Totro" id="Totr" onkeyup="AUbigeo('Ubigeo')"/></td>
                </tr>
            </table>
            <table>
                <thead>
                    <tr>
                        <th>id_ubigeo_dep</th>
                        <th>id_ubigeo_prov</th>
                        <th>id_ubigeo_dist</th>
                        <th>id_ubigeo_otro</th>
                        <th>nom_ubigeo_dep</th>
                        <th>nom_ubigeo_prov</th>
                        <th>nom_ubigeo_dist</th>
                        <th>nom_ubigeo_otro</th>
                    </tr>
                </thead>
                <tbody id="listaU">
                    <% LinkedList<Ubigeo> lUbig = Lista.getListaUbigeo();
                        for (int lu = 0; lu < lUbig.size(); lu++) {%>
                    <tr id="<%=lUbig.get(lu).getIDUBIGEO()%>">
                        <td align="center"><%=lUbig.get(lu).getIDUBIGEODEP()%></td>
                        <td align="center"><%=lUbig.get(lu).getIDUBIGEOPROV()%></td>
                        <td align="center"><%=lUbig.get(lu).getIDUBIGEODIST()%></td>
                        <td align="center"><%=lUbig.get(lu).getIDUBIGEOOTRO()%></td>
                        <td align="center"><%=lUbig.get(lu).getNOMUBIGEODEP()%></td>
                        <td align="center"><%=lUbig.get(lu).getNOMUBIGEOPROV()%></td>
                        <td align="center"><%=lUbig.get(lu).getNOMUBIGEOSDIST()%></td>
                        <td align="center"><%=lUbig.get(lu).getNOMUBIGEOOTRO()%></td>
                        <td align="center"><input type="image" name="seleccionar" src="/RegCivil/imagenes/apply.png" alt="borrar" value="<%=lUbig.get(lu).getIDUBIGEO()%>" onclick="selectUbigeo(this)"/></td>
                    </tr>
                    <%}%>
                </tbody>
            </table>
        </div>


        <div id="NAVUbigeoM" title="Lista De Ubigeos">
            <table>
                <tr>
                    <td><label/>Departamento</td>
                    <td><input type="text" name="TdepartamentoM" id="TdepM" onkeyup="AUbigeo('UbigeoM')"/></td>
                    <td><label/>Provincia</td>
                    <td><input type="text" name="TprovinciaM" id="TproM" onkeyup="AUbigeo('UbigeoM')"/></td>
                    <td><label/>Distrito</td>
                    <td><input type="text" name="TdistritoM" id="TdisM" onkeyup="AUbigeo('UbigeoM')"/></td>
                    <td><label/>Otro</td>
                    <td><input type="text" name="TotroM" id="TotrM" onkeyup="AUbigeo('UbigeoM')"/></td>
                </tr>
            </table>
        </table>
        <table>
            <thead>
                <tr>
                    <th>id_ubigeo_dep</th>
                    <th>id_ubigeo_prov</th>
                    <th>id_ubigeo_dist</th>
                    <th>id_ubigeo_otro</th>
                    <th>nom_ubigeo_dep</th>
                    <th>nom_ubigeo_prov</th>
                    <th>nom_ubigeo_dist</th>
                    <th>nom_ubigeo_otro</th>
                </tr>
            </thead>
            <tbody id="listaUM">
                <% LinkedList<Ubigeo> lUbigM = Lista.getListaUbigeo();
                    for (int lu = 0; lu < lUbigM.size(); lu++) {%>
                <tr id="<%=lUbigM.get(lu).getIDUBIGEO()%>">
                    <td align="center"><%=lUbigM.get(lu).getIDUBIGEODEP()%></td>
                    <td align="center"><%=lUbigM.get(lu).getIDUBIGEOPROV()%></td>
                    <td align="center"><%=lUbigM.get(lu).getIDUBIGEODIST()%></td>
                    <td align="center"><%=lUbigM.get(lu).getIDUBIGEOOTRO()%></td>
                    <td align="center"><%=lUbigM.get(lu).getNOMUBIGEODEP()%></td>
                    <td align="center"><%=lUbigM.get(lu).getNOMUBIGEOPROV()%></td>
                    <td align="center"><%=lUbigM.get(lu).getNOMUBIGEOSDIST()%></td>
                    <td align="center"><%=lUbigM.get(lu).getNOMUBIGEOOTRO()%></td>
                    <td align="center"><input type="image" name="seleccionar" src="/RegCivil/imagenes/apply.png" alt="borrar" value="<%=lUbigM.get(lu).getIDUBIGEO()%>" onclick="selectUbigeoM(this)"/></td>
                </tr>
                <%}%>
            </tbody>
        </table>
    </div>


</body>
</html>
